package com.mrx.pvzcommunity.model.thread;

import com.mrx.pvzcommunity.model.user.AvatarUser;
import com.mrx.pvzcommunity.model.user.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel(value = "评论对象")
public class Comment implements Serializable {
    @ApiModelProperty(value = "评论 id", example = "1")
    private long id;
    @ApiModelProperty(value = "帖子 id", example = "1")
    private long tid;
    @ApiModelProperty(value = "评论内容 id", example = "我是评论内容")
    private String content;
    @ApiModelProperty(value = "发布用户", example = "1")
    private User user;

    public AvatarUser getUser() {
        return user.toAvatarUser();
    }
}
